/**
 * Generate code from /{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/mapping/{{entities}}InheritMapping.java.hbs
 */
package cn.ibizlab.core.ad.mapping;

import org.mapstruct.*;
import cn.ibizlab.core.ad.domain.SysMember;
import cn.ibizlab.core.ad.domain.SysActiveDirectory;
import java.util.List;

/**
 * 成员继承映射[SysMember]
 *
 * @author generator
 */
@Mapper(componentModel = "spring", uses = {})
public interface SysMemberInheritMapping {

    /**
     * 转换SysActiveDirectory
     * 
     * @param sysMember
     * @return
     */
    @Mappings({
            @Mapping(target ="focusNull",ignore = true),
            @Mapping(source ="personId",target = "id"),
            @Mapping(source ="organizationId",target = "organizationId"),
            @Mapping(source ="departmentId",target = "departmentId"),
            @Mapping(source ="dc",target = "dc"),
            @Mapping(source ="displayName",target = "name"),
            @Mapping(source ="sort",target = "sort"),
            @Mapping(source ="enabled",target = "enabled"),
            @Mapping(source ="organizationalRoleId",target = "parentId"),
    })
    SysActiveDirectory toSysActiveDirectory(SysMember sysMember);

    /**
     * 转换SysActiveDirectory
     * 
     * @param sysActiveDirectory
     * @return
     */
    @Mappings({
            @Mapping(target ="focusNull",ignore = true),
            @Mapping(source ="id",target = "id"),
            @Mapping(source ="organizationId",target = "organizationId"),
            @Mapping(source ="id",target = "personId"),
            @Mapping(source ="departmentId",target = "departmentId"),
            @Mapping(source ="dc",target = "dc"),
            @Mapping(source ="name",target = "displayName"),
            @Mapping(source ="sort",target = "sort"),
            @Mapping(source ="enabled",target = "enabled"),
            @Mapping(source ="parentId",target = "organizationalRoleId"),
    })
    SysMember toSysMember(SysActiveDirectory sysActiveDirectory);

    /**
     * List SysMember 对象转换
     *
     * @param list
     * @return
     */
    List<SysActiveDirectory> toSysActiveDirectory(List<SysMember> list);

    /**
     * List SysActiveDirectory 对象转换
     *
     * @param list
     * @return
     */
    List<SysMember> toSysMember(List<SysActiveDirectory> list);

}
